package com.ruoyi.table.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.mybatis.core.page.PageQuery;
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
import com.ruoyi.table.domain.DiningTable;
import com.ruoyi.table.domain.dto.DiningTableSaveBatchDTO;

/**
 * 商店餐桌服务
 *
 * @author steakliu
 * @email 2319492349@qq.com
 * @date 2021-01-24 01:14:45
 */
public interface DiningTableService extends IService<DiningTable> {

    /**
     * 计算使用
     *
     * @param areaId 区域id
     * @return long
     */
    long countUsing(Long areaId);

    /**
     * 列表餐桌
     *
     * @param diningTable 餐桌
     * @param pageQuery   页面查询
     * @return {@link TableDataInfo}<{@link DiningTable}>
     */
    TableDataInfo<DiningTable> pageDiningTable(DiningTable diningTable, PageQuery pageQuery);

    /**
     * 保存餐桌
     *
     * @param diningTable 餐桌
     * @return int
     */
    int saveDiningTable(DiningTable diningTable);

    /**
     * 更新餐桌
     *
     * @param diningTable 餐桌
     * @return int
     */
    int updateDiningTable(DiningTable diningTable);

    /**
     * 批量保存餐桌
     *
     * @param dto dto
     * @return boolean
     */
    boolean saveDiningTableBatch(DiningTableSaveBatchDTO dto);
}

